package com.bolt.core.view.tag;


import com.bolt.common.utils.SpringContextUtil;
import com.bolt.core.view.components.ComponentsBase;
import com.bolt.core.view.components.MonthSelect;

public class MonthSelectTag extends InputTag {

    private int start = 1;

    private int end = 12;

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    @Override
    public ComponentsBase getUI() {
        MonthSelect select = new MonthSelect();
        select.setId(getId());
        select.setName(getName());
        select.addParameter("start", start);
        select.addParameter("end", end);
        SpringContextUtil.inject(select);
        return select;
    }


}
